<template>
  <div id="app">
    <Watermark :text="form.text"></Watermark>
    <router-view/>
    <theme-picker/>
  </div>
</template>

<script>
import ThemePicker from "@/components/ThemePicker";
import axios from "axios";
import Watermark from "./Watermark.vue";

export default {
  name: "App",
  components: {ThemePicker, Watermark},
  data() {
    return {
      form: {
        text: '善泉户外'
      }
    }
  },
  watch: {
    $route() {
      let text = '善泉户外' + this.$store.getters.nickName || ''
      this.$set(this.form, 'text', text)
    },
  },
  metaInfo() {
    return {
      title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
      titleTemplate: title => {
        return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
      }
    }
  }
};
</script>
<style scoped>
#app .theme-picker {
  display: none;
}
</style>
